package com.xiaoshuidi.cloud.module.contract.enums.contract;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 交房状态的枚举类
 *
 * @author 合房源码
 */
@Getter
@AllArgsConstructor
public enum DeliveryStatusEnum {
    DELIVERED("delivered", "已交房"),
    WAIT_RENTER_CONFIRM("wait_renter_confirm","待租客确认");

    private String code;
    private String msg;

    public static String getName(String code) {
        for (DeliveryStatusEnum c : DeliveryStatusEnum.values()) {
            if (c.getCode().equals(code)) {
                return c.msg;
            }
        }
        return null;
    }
}
